//! implement a chains protocol for BrdChain based net host
//! first : One data need a uuid v4 id as id . to location or index.
//! second : One data need know where this data location :    like :   Host/Ip/Path
//!
//! implement a chains protocol for BrdChain based net host
//! a tree struct , but based on network.
//! location is BrdLoc.
//!  include host, path, uid,
//! 
//! Brdlike :    data://host:port/uid
//!     Brdtask is included in a brdchain; format like
//!      arg: base64_str    output_tp  like   0b10        |   0b00        |  0b01
//!                                           to data log  |   to next data |  to next many brds 
//!     cmd://main@arg,arg,args->output_tp
//! 
//! ChainMechanism : 
//!     define: 
//!         transform
//!             need function:  cast(data: &BrdChain) -> bool
//!             run like:
//!                  cast(run_local|data|deal_output) 
//!                         ->  OtherHost(run_local|data|deal_output)
//!                         ->  OtherHost...
//!                          ->  OtherHost...
//!         status
//!         collection
//! 
#[allow(unused)]
#[macro_use]
extern crate serde_json;
#[macro_use]
extern crate lazy_static;
extern crate regex;
extern crate log;
extern crate bincode;
extern crate select;
extern crate base64;
extern crate crypto;
extern crate rand;
extern crate reqwest;
extern crate rusqlite;

pub mod net;
pub mod log_utils;
pub mod security;
pub mod excutive;
pub mod data;
pub mod output;
pub mod db;
pub mod flow;

pub use data::Chain;
pub use data::Loc;
pub use data::Task;
pub use data::ChainData;
pub use data::ChainNet;
pub use data::LocInfo;
pub use excutive::CmdRun;

pub use data::STATUS_READY;
pub use data::STATUS_RUN;
pub use data::STATUS_EDN;
pub use net::Client;

#[allow(unused)]
pub use data::STATUS_SUSS;
pub use data::STATUS_ERR;
pub use data::BRD_TP_CMD;
pub use data::BRD_TP_LIB;
pub use data::OUTPUT_TO_BRD;
pub use data::OUTPUT_TO_MANY_BRD;
pub use data::OUTPUT_TO_LOG;
pub use data::ls_brd;
pub use colored::Colorize as Color;

